package ningbo.Controlling_Execution;


import java.util.Random;

/**
 * @Author 宁铂
 * @Date 2021/7/12 20:39
 * @Version 1.0
 */
public class ForEachFloat {
    /** 练习:假设有一个float数组,我们要读取每一个元素 */
    public static void main(String[] args) {
        Random rand = new Random(47);
        float[] f = new float[10];
        for (int i =0; i < 10;i++)
            f[i] = rand.nextFloat();
        for(float x : f)
            System.out.println(x);
    }
}
